package com.diy.sigmund.diycommon.designpatterns.decoratorpattern.starbuzz;

/**
 * 调料摩卡
 *
 * @author ylm-sigmund
 * @since 2022/1/17 11:12
 */
public class Mocha extends CondimentDecorator {

    Beverage beverage;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    protected double cost() {
        return 0.20+ beverage.cost();
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",调料摩卡";
    }
}
